<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<style>
.login{
	border-radius: 20px 20px 20px 20px;
	background-color: transparent;
}
#account{
	border-radius: 15px 15px 15px 15px;
	text-align: center;
}
#account:focus{
	border-color:gray;
}
#pass{
	border-radius: 15px 15px 15px 15px;
	text-align: center;
}
#pass:focus{
	border-color:gray;
}
#login{
	border-radius: 15px 15px 15px 15px;
	width:100%;
	height: 30px;
}
</style>
<link href="<%=basePath %>css/load.css" rel="stylesheet" />
<body>
	<div class="introLoaderWrapper" id="introLoaderWrapper">
		<div class="introLoader">
			<i id="loadingMessage"></i> <span class="text" id="loginText">Loading...</span>
		</div>

		<!--[if lte IE 7]><span class="ltie7Logo" alt="Akrapovič"></span><![endif]-->
		<!--[if lte IE 8]>
            <span class="ieNotice"><p>This website is not optimized for use with Internet Explorer 8 and its earlier versions.<br /><a href="http://windows.microsoft.com/en-us/internet-explorer/download-ie">Update your browser</a> or <a href="http://www.google.com/chrome/">install Google Chrome.</a></p></span>
        <![endif]-->
	</div>


	<div class="login">

		<form action="" id="loginForm">
			<div class="item logo">蚂蚁搬家管理系统</div>
			<div class="item">
				<input id="account" type="text" placeholder="请输入用户名" />
			</div>
			<div class="item">
				<input id="pass" type="password" placeholder="请输入密码" />
			</div>
			<%--     		<div class="item code">
    			<input type="text" placeholder="请输入验证码"/>
    			<img src="<%=basePath %>img/code.jpg" />
    		</div> --%>
    		<div class="item warning">
				<p style="text-align: center;width: 100%" id="message"></p>
			</div>
			<div class="item">
				<button id="login" type="button" class="btn">登 录</button>
			</div>
		</form>

	</div>

	<iframe src="<%=basePath%>View/web/gif" class="gifBg"></iframe>

	<script src="<%=basePath %>js/jquery-2.1.4.min.js"></script>
	<script>
	setTimeout(function(){
		$('.login,.introLoader,.gifBg').fadeToggle(1000);
	},2000)
	$('#login').click(function(){
       	var account = $('#account').val();
       	var pass = $('#pass').val();
       	$.post("<%=basePath %>admin/login",{'account':account,'pass':pass},function(data){
       		if (data.code==200){
       			$('.login,.introLoader,.gifBg').fadeToggle(1000);
       			$('#loginText').text('系统登录验证中...')
       			setTimeout(function(){
       				$('#loginText').text(data.message);
       			},6000); 
       			setTimeout(function(){
       				window.location.href='web/index';
       			},4000); 
       		}else{
       			$('#message').html(data.message);
       		}
       	})
	})
</script>
</body>
</html>